<?php

namespace app\api\service\store;

use app\api\model\store\Goods as GoodsModel;
use app\api\service\BaseService;

class Goods extends BaseService
{

    public $model = NULL;

    public function __construct()
    {
        $this->model = new GoodsModel();
    }

    public function updateStock($data) {
        // 批量更新方式去处理
        foreach($data as $value) {
            $this->model->incStock($value['id'], $value['num']);
        }
        return true;
    }


}